﻿<mvvm:View x:Class="HelloWorld.Startup.Views.LanguagesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mvvm="clr-namespace:HelloWorld.Startup.MVVM"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480"
    x:Name="view">
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border>
            <Border.Background>
                <SolidColorBrush Color="White" Opacity="0.3"/>
            </Border.Background>
            <StackPanel Orientation="Horizontal" Margin="10">
                <TextBlock Text="{Binding ElementName=view, Path=LocalizationModel.CurrentLanguage}" FontSize="22" FontWeight="Bold" />
                <TextBlock Text="{Binding Path=CurrentLanguage}" FontSize="22" FontWeight="Bold" Margin="10,0,0,0"/>
            </StackPanel>
        </Border>
        <ListBox Grid.Row="1" ItemsSource="{Binding Path=AvailableLanguages}" SelectedItem="{Binding Path=CurrentLanguage, Mode=TwoWay}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="0,0,0,17" Width="432">
                        <TextBlock Text="{Binding .}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</mvvm:View>
